|
Oasis Support Engineering : Bogus yyyyddd error files....
This page last changed on Nov 07, 2007 by rich.
From: Schramm, Rich rich@mbari.org
Sent: Tuesday, November 06, 2007 3:26 PM
To: Oasis Mooring Discussion List
Subject: oasis occasional bogus oasis timestamp explanation...
Several OSG folks have mentioned annoyance at some of the wacko time-stamped
files that getcreated because of occasional garbled transmissions. The oasis
system is remarkably able tore-request the missing records on subsequent
downloads, however there are occasionally somegenerated garbage files that
remain to be manually cleaned out. I believe I understand where they are
sneaking through the extraction process and what wewould need to do to
fix it should we wish too. This 'fix' would not effect the raw datafiles,
only the generated errors files.
In /oasis/src/oasis3/src/operations/src/extract.c ~ LINE 410
The code snippet below runs in a while-loop and when errors are encountered
it kicks out ofwherever its at using a "continue" to cause the loop to
seek-out the next sync byte in theraw stream... It appears while there
are checks for bad record types etc. The only time checkis for time=0L
(see (klh)08Aug01 below)
My suspicion is that the occasional garbled timestamp passes the unix conversion
to a "valid" gmt but is nonsense to us. The fix would be to reject times "too old"
or into the future by adding a test immediately afterKents 0 test and prior to
computing a new value for the global 'itime'. (we don't want to allowitime to
get set to bogus yyyyddd because its used to generate filenames...hence the
problem....)"into the future" is easily determined from the cpu clock... what
a reasonable "too old" would need to be decided though we are trying to
clip wild things like more than a couple of years ago... If we don't want
to fix the extract - no biggie as far as Im concerned, we can just tuck this
bit of knowledge away for future reference Thoughts anyone.-Rich:
:
:
:
hdr.log_type = buffer0;
hdr.log_nmbr = getHdrWord(&buffer1, fileType);
hdr.log_len = getHdrWord(&buffer3, fileType);
hdr.log_time = getHdrLong(&buffer5, fileType);tp = gmtime( (time_t *)&hdr.log_time );
/* Error check for bad header (klh) 08aug01*/
if(tp==0L) { print_error("Invalid header log time in %s, record %d (type %d)\n", filename, hdr.log_nmbr,hdr.log_type);continue; } if ( y2k )
itime = (1000 * (tp->tm_year + 1900)) + tp->tm_yday + 1;
else
itime = (1000 * tp->tm_year) + tp->tm_yday + 1;dtime = tp->tm_yday + 1.0 + (double)((3600 * tp->tm_hour)
+ (60 * tp->tm_min) + tp->tm_sec) / 86400.0;len_got = cc - 9; /* compute amount of log data gotten*/
if ( len_got > 0 )
memmove( buffer, buffer + 9, sizeof(buffer) - 9 );
else if ( len_got < 0 ) /* Move log data to start of buffer*/
{
printf("Incomplete record header in %s, record %d (type %d)\n",
filename, hdr.log_nmbr,hdr.log_type);
continue;
}
:
:
:
:
|
| Document generated by Confluence on Feb 04, 2026 08:35 |